package com.sun.syndication.feed.module.feedburner;

import org.jdom.Element;

import com.sun.syndication.feed.module.Module;
import com.sun.syndication.io.ModuleParser;


public class Parser implements ModuleParser {

    public String getNamespaceUri() {
        return FeedburnerModule.FEEDBURNER_URI;
    }

    public Module parse(Element element) {
        Element origLink = element.getChild("origLink", FeedburnerModule.FEEDBURNER_NS);
        if (origLink != null) {
            FeedburnerModuleImpl impl = new FeedburnerModuleImpl(FeedburnerModule.class, FeedburnerModule.FEEDBURNER_URI);
            impl.setOrigLink(origLink.getTextTrim());
            return impl;
        }
        return null;
    }

}
